package com.cyf.smartCity;

import com.cyf.smartCity.bean.*;
import com.cyf.smartCity.service.StatisticsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@Api("智慧停管平台-报表统计")
@RequestMapping(value = "statistics/")
public class StatisticsHttpController {

    @Autowired
    private StatisticsService statisticsService;




    @PostMapping("sentryBox/list")
    @ApiOperation(value = "获取岗亭列表")
    public WechatParkListSentryBoxRsp listSentryBox(@RequestParam Integer parkingId) {
        return statisticsService.listSentryBox(parkingId);
    }

    @PostMapping("report/carFlow")
    @ApiOperation(value = "车流统计")
    public WechatParkReportCarFlowRsp reportCarFlow(@RequestBody WechatParkReportCarFlowReq req) {
        return statisticsService.reportCarFlow(req);
    }

    @PostMapping("report/feeFlow")
    @ApiOperation(value = "收入统计")
    public WechatParkReportFeeFlowRsp reportFeeFlow(@RequestBody WechatParkReportReq req) {
        return statisticsService.reportFeeFlow(req);
    }

    @PostMapping("report/settleFlow")
    @ApiOperation(value = "收费人员统计")
    public WechatParkReportSettleFlowRsp reportSettleFlow(@RequestBody WechatParkReportReq req) {
        return statisticsService.reportSettleFlow(req);
    }

    @PostMapping("report/carTimeFlow")
    @ApiOperation(value = "会员统计")
    public WechatParkReportCarTimeFlowRsp reportCarTimeFlow(@RequestBody WechatParkReportCarTimeFlowReq req) {
        return statisticsService.reportCarTimeFlow(req);
    }





}
